package com.xbb.controller.forum;

import com.xbb.bean.FileBean;
import com.xbb.service.ImproveAService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by xbb on 15/7/11.
 */
@Controller
@RequestMapping("forum/improve")
public class ImproveController {
    private String PATH = "/Users/xbb/pan";
    @Resource
    private ImproveAService improveService;

    @RequestMapping("improve")
    public void improve(Model model, String dirName){
        String path = (dirName == null ? "" : dirName);
        System.out.println(path);
        List<FileBean> fileBeanList = improveService.getFiles(path);
        model.addAttribute("fileList", fileBeanList);
    }


}
